#ifndef _MODULE_TURNPLATE_MOTOR_H_
#define _MODULE_TURNPLATE_MOTOR_H_

#ifdef __cplusplus
extern "C" {
#endif
	 
#include "includes.h"
#include "Tool_PID.h"
#define RM2006
#define Motor_Bin1	PCout(5)
#define Motor_Bin2	PCout(4)
#define MOS_PWM		PAout(6)
#define Turnplate_motor_PWM1  TIM3->CCR1
#define Turnplate_motor_PWM2  TIM3->CCR2
#define Turnplate_motor_PWM3  TIM3->CCR3
#define Turnplate_motor_PWM4  TIM3->CCR4
//#endif 
#ifdef _MODULE_TURNPLATEMOTOR_GLOBALS
#define _MODULE_TURNPLATEMOTOR_EXT        
#else 
#define _MODULE_TURNPLATEMOTOR_EXT   extern
#endif

typedef struct Encoder_Stuct
{
	int16_t Speed;
	int Position;
}EncoderStuct;

void Encoder_Start(void);
EncoderStuct Encoder_Get_CNT(void);
void Turnplate_motor(int temp);
void TurnplateMotor_Config(void);
void CAN_TurnplateMotor_Pack_Handle(CanRxMsg *msg_rece);
void TurnplateMotor_Shoot(int current);
_MODULE_TURNPLATEMOTOR_EXT PID TurnplatePID,RM2006PID;;

#ifdef __cplusplus
}
#endif

#endif

